<template>
  <ElConfigProvider :locale="locale">
    <router-view />
  </ElConfigProvider>
</template>
<script setup>
import { ref, computed, watch } from 'vue'
import { ElConfigProvider } from 'element-plus'
import zhLocale from 'element-plus/lib/locale/lang/zh-cn'
import enLocale from 'element-plus/lib/locale/lang/en'
import store from '@/store'
console.error(11)
const lang = computed(() => store.getters.language)
const locale = ref(lang.value === 'en' ? enLocale : zhLocale)

watch(lang, () => {
  location.reload()
})
</script>
<style></style>
